//
//  RSShowQRCode_BarCodeVC.m
//  RSTools
//
//  Created by thinkjoy on 2017/10/16.
//  Copyright © 2017年 杜瑞胜. All rights reserved.
//

#import "RSShowQRCode_BarCodeVC.h"
#import "UIImage+JGQRCode.h"

#define kWin_W ([UIScreen mainScreen].bounds.size.width)

@interface RSShowQRCode_BarCodeVC ()
@property (weak, nonatomic) IBOutlet UIImageView *QRCodeImgV;

@property (weak, nonatomic) IBOutlet UIImageView *barCodeImgV;
@end

@implementation RSShowQRCode_BarCodeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //二维码
    UIImage *Codeimg1 = [UIImage qrCodeImageWithContent:@"http:// baidu.com"
                                          codeImageSize:200
                                                   logo:[UIImage imageNamed:@"appicon"]
                                              logoFrame:CGRectMake(75, 75, 50, 50)
                                                    red:0
                                                  green:0.4
                                                   blue:0.6];
    self.QRCodeImgV.image   =   Codeimg1;
    
    //条形码
    UIImage *Codeimg2 = [UIImage barcodeImageWithContent:@"1234567890"
                                           codeImageSize:self.barCodeImgV.frame.size
                                                     red:0
                                                   green:0.4
                                                    blue:0.6];
    self.barCodeImgV.image  =   Codeimg2;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
